<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>班级信息编辑</title>
    <link rel="stylesheet" th:href="@{/css/plugins/layui/css/layui.css}" >
</head>
<body>
<body>
    <div th:object="${cla}"class="layui-form">
        <!--        <input type="hidden" id="id" name="id" value="${user.id}">-->
        <input type="hidden" id="claId" th:field="*{claId}">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">班级名称</label>
                <div class="layui-input-inline layui-input-wrap">
                    <input type="text" id="claName"  th:field="*{claName}" class="layui-input">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属年级</label>
                <div class="layui-input-inline layui-input-wrap">
                    <select id="gradeId" name="gradeId" th:with="grades=${@gradeService.list()}">
                        <option value="">请选择</option>

                        <option th:each="g : ${grades}" th:text="${g.gradeName}" th:value="${g.gradeId}" th:selected="${cla.grade != null && g.gradeId == cla.grade.gradeId}"></option>
                    </select>
                </div>
            </div>
        </div>
    </div>
<script th:src="@{/js/jquery.min.js}"></script></body>
<script th:src="@{/js/plugins/layui/layui.js}"></script>
</body>
</html>
